package cn.com.sixboy.entity;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 * @author Sam.Zheng <zcl1866@sina.com>
 * @date 2013-5-4 14:07:08
 * @version <v0.1>
 * @copyright SixBoy
 */
@Entity
@Table(name = "t_cai")
@NamedQueries({
		@NamedQuery(name = "findAllCais", query = "select s from Cai s order by  s.id"),
		@NamedQuery(name = "findAllCaisByName", query = "select s from Cai s where s.name like :name order by s.id"),
		@NamedQuery(name = "findCaisByShanghuId", query = "select s from Cai s where s.shanghuId = :shanghuId order by s.id") })
public class Cai implements Serializable {

	@Id
	@TableGenerator(name = "cai", table = "sys_generator", pkColumnName = "key_name", pkColumnValue = "CAI_ID", valueColumnName = "key_value", initialValue = 1, allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "cai")
	private Integer id;

	/**
	 * 商户Id
	 */
	@Column(name = "shanghu_id", length = 50)
	private Integer shanghuId;

	/**
	 * 菜名
	 */
	@Column(name = "name", length = 50)
	private String name;

	/**
	 * 菜Logo
	 */
	@Column(name = "caiLogo", length = 200)
	private String caiLogo;

	/**
	 * 菜简介
	 */
	@Column(name = "caiDesc", length = 500)
	private String caiDesc;

	/**
	 * 菜大图
	 */
	@Column(name = "caiPics", length = 1000)
	private String caiPics;

	/**
	 * 菜所属类别
	 */
	@Column(name = "caiType", length = 200)
	private String caiType;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getShanghuId() {
		return shanghuId;
	}

	public void setShanghuId(Integer shanghuId) {
		this.shanghuId = shanghuId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCaiLogo() {
		return caiLogo;
	}

	public void setCaiLogo(String caiLogo) {
		this.caiLogo = caiLogo;
	}

	public String getCaiDesc() {
		return caiDesc;
	}

	public void setCaiDesc(String caiDesc) {
		this.caiDesc = caiDesc;
	}

	public String getCaiPics() {
		return caiPics;
	}

	public void setCaiPics(String caiPics) {
		this.caiPics = caiPics;
	}

	public String getCaiType() {
		return caiType;
	}

	public void setCaiType(String caiType) {
		this.caiType = caiType;
	}
}
